<?php
	header("Content-type:text/html;charset=utf-8");
	$number= $_POST["userId"];
	$code=$_POST["usePassword"];
	// $_POST
	$conn = mysql_connect("localhost","root","root");
	
	mysql_select_db("2107");
	
	$result = mysql_query("select * from register where stu_number= '$number'",$conn);
	// 没定义
	//echo就是responseText
	if(mysql_num_rows($result) >= 1){
		echo "1";
	}else{
		mysql_query("insert into register(stu_number,stu_code) values('$number','$code');",$conn);
		echo "0";
	}
		mysql_close($conn);
?>